package com.cgy.utils.netx.server;

import com.cgy.utils.netx.config.ServerConfig;

/**
 * @author CHTK
 */
public interface INetworkServerLibrary<Server> {

    /**
     * 基础配置
     * @param serverConfig
     * @return
     */
    public INetworkServerLibrary config(ServerConfig serverConfig);

    /**
     * 启动
     * @throws Exception
     */
    public void start() throws Exception;

    /**
     * 启动
     * @throws Exception
     */
    public void stop() throws Exception;

    /**
     * 获取服务端
     * @return
     * @throws Exception
     */
    public Server getServer() throws Exception;
}
